import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false

import store from './store'

Vue.prototype.$store = store


import $H from '@/common/lib/request.js'
Vue.prototype.$H = $H

import $U from '@/common/lib/util.js'
Vue.prototype.$U = $U

// 权限跳转
Vue.prototype.navigateTo = (option) =>{
	if(!store.state.user.loginStatus){
		uni.showToast({
			title: '请先登录',
			icon: 'none'
		})
		return uni.navigateTo({
			url: '/pages/login'
		})
	}
	uni.navigateTo(option)
}



App.mpType = 'app'
const app = new Vue({
	store,
	...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif

// #ifdef H5
//import VConsole  from "vconsole";
//new VConsole();
// #endif
